package com.ningyue.water;

import com.ningyue.water.entity.HelloTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
public class HelloController {
    Logger logger = LoggerFactory.getLogger(HelloController.class);

	@RequestMapping("hello")
	public String printWelcome(ModelMap model) {
        logger.info("say hello is not easy!");
		model.addAttribute("message", "Hello world!");
		HelloTest helloTest=new HelloTest();
		helloTest.setId(1l);
		helloTest.setName("toms");
		model.addAttribute("people",helloTest);
		return "hello";
	}
}